/**
 * 右侧导航
 */
define(function (require) {
    'use strict';
    var $ = require('jquery');
    var NavManager = require('/static_public/public_menu/navManager.js');
    require('/static_public/js/token');

    return {
        init: function () {
            new NavManager($('#nav'), [
                {
                    'id': 'menu_home',
                    'code': '',
                    'name': '首页',
                    'level': 1,
                    'iconCls': 'icon-home',
                    'cls':'index',
                    'url': ['/index.shtml', '/', '/page/add_application/index.html', '/page/public_no/index.shtml', '/page/public_no/edit.shtml'],
                    'children': null,
                    'attrs': {'data-no-token': ''}
                },
                {
                    'id': 'menu_project',
                    'code': '0000200101',
                    'name': '项目房源',
                    'level': 1,
                    'iconCls': 'icon-project',
                    'url': ['/page/houses_manage/project_manage.shtml','/page/houses_manage/house_manage.shtml','/page/houses_manage/house_manage.shtml?projId={placeholder_}&type=edit'],
                    'children': null,
                    'attrs': {'data-no-token': ''}
                },
                {
                    'id': 'user_management',
                    'code': '',
                    'name': '团队管理',
                    'level': 1,
                    'iconCls': 'icon-teamManage',
                    'url': '',
                    'cls': 'icon-fav',
                    'children': [{
                        'id': 'user_admin',
                        'name': '成员管理',
                        'code': '00002701',
                        'level': 2,
                        'showInIframe': true,
                        'url': ['/page/user_manage/member_manage.html'],
                        'attrs': {'data-no-token': ''}
                    }, {
                        'id': 'saleTeam',
                        'name': '销售团队管理',
                        'code': '00002702',
                        'level': 2,
                        'showInIframe': true,
                        'url': ['/page/user_manage/salesteam_manage.html'],
                        'attrs': {'data-no-token': ''}
                    }]
                },
                {
                    'id': 'user_management',
                    'code': '',
                    'name': '用户管理',
                    'level': 1,
                    'iconCls': 'icon-userManage',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'role_authorization',
                            'code': '0000210201',
                            'name': '角色授权设置',
                            'level': 2,
                            'url': ['/page/user_management/role_authorization_qmyx.shtml'],
                            'attrs': {'data-no-token': ''}
                        },
                        {
                            'id': 'org_management',
                            'code': '0000210202',
                            'name': '组织用户管理',
                            'level': 2,
                            'url': ['/page/user_management/org_management_qmyx.shtml'],
                            'attrs': {'data-no-token': ''}
                        }
                    ]
                },
                {
                    'id': 'message_records',
                    'code': '00002501',
                    'name': '短信记录',
                    'level': 1,
                    'iconCls': 'icon-message',
                    'url': ['/page/message_management/message_records.shtml'],
                    'children': null,
                    'attrs': {'data-no-token': ''}
                },
                {
                    'id': 'my_application',
                    'code': '',
                    'name': '我的应用',
                    'level': 1,
                    'iconCls': 'icon-application',
                    'url': ['/page/my_application/index.shtml'],
                    'children': null,
                    'attrs': {'data-no-token': ''}
                },
                {
                    'id': 'system_setting',
                    'code': '',
                    'name': '系统设置',
                    'level': 1,
                    'iconCls': 'icon-set',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'erp_interface',
                            'code': '00002801',
                            'name': 'ERP接口配置',
                            'level': 2,
                            'url': ['/page/system_setting/erp_interface.shtml'],
                            'attrs': {'data-no-token': ''}
                        },
                        {
                            'id': 'data_init',
                            'code': '00002802',
                            'name': '数据初始化',
                            'level': 2,
                            'url': ['/page/system_setting/data_init.shtml'],
                            'attrs': {'data-no-token': ''}
                        }
                    ]
                }
            ]);
        }
    };
});
